#ifndef __GLOBALS_H
#define __GLOBALS_H

#define FOREACH(it, container)  for (it = container.begin(); it != container.end(); it ++)

#define HASP_MEMOMERY_USED_SIZE 48

template <class T, class F>
bool isFlag( T flags, F flagsToTest )
{
    return (flags & flagsToTest) == flagsToTest;
}

template <class T, class F>
bool anyFlag( T flags, F flagsToTest )
{
    return (flags & flagsToTest) != 0;
}

template <class T, class F>
T setFlag( T & flags, F flagsToSet )
{
    return flags |= flagsToSet;
}

template <class T, class F>
T clearFlag( T & flags, F flagsToSet )
{
    return flags &= ~flagsToSet;
}

void errorBox( const QString & errorStr );
void warningBox( const QString & warningStr );
void informationBox( const QString & informationStr );
bool questionBox( const QString & titleStr, const QString & questionStr );

#endif
